home *** CD-ROM | disk | FTP | other *** search
/ PC Users 8 / Cd Pc Users extra 8.iso / prog / inst / firstimp / vcimpres.z / GRIDINFO.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-11-07  |  35.9 KB  |  992 lines

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    Appearance      =   0  'Flat
  4.    BackColor       =   &H00C0C0C0&
  5.    BorderStyle     =   1  'Fixed Single
  6.    Caption         =   "DataGrid Organization Example"
  7.    ClientHeight    =   7290
  8.    ClientLeft      =   1215
  9.    ClientTop       =   1545
  10.    ClientWidth     =   9435
  11.    BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  12.       Name            =   "MS Sans Serif"
  13.       Size            =   8.25
  14.       Charset         =   0
  15.       Weight          =   700
  16.       Underline       =   0   'False
  17.       Italic          =   0   'False
  18.       Strikethrough   =   0   'False
  19.    EndProperty
  20.    ForeColor       =   &H80000008&
  21.    Height          =   7695
  22.    Icon            =   "GRIDINFO.frx":0000
  23.    Left            =   1155
  24.    LinkTopic       =   "Form1"
  25.    MaxButton       =   0   'False
  26.    MinButton       =   0   'False
  27.    ScaleHeight     =   7290
  28.    ScaleWidth      =   9435
  29.    Top             =   1200
  30.    Width           =   9555
  31.    Begin VB.ListBox lstChartType 
  32.       BackColor       =   &H00C0C0C0&
  33.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  34.          Name            =   "Arial"
  35.          Size            =   8.25
  36.          Charset         =   0
  37.          Weight          =   400
  38.          Underline       =   0   'False
  39.          Italic          =   0   'False
  40.          Strikethrough   =   0   'False
  41.       EndProperty
  42.       Height          =   3210
  43.       Left            =   6480
  44.       TabIndex        =   0
  45.       Top             =   60
  46.       Width           =   2895
  47.    End
  48.    Begin Threed.SSPanel SSPanel2 
  49.       Height          =   3675
  50.       Left            =   6480
  51.       TabIndex        =   1
  52.       Top             =   3540
  53.       Width           =   2895
  54.       _Version        =   65536
  55.       _ExtentX        =   5106
  56.       _ExtentY        =   6482
  57.       _StockProps     =   15
  58.       Caption         =   "Chart Information"
  59.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  60.          Name            =   "Arial"
  61.          Size            =   9.75
  62.          Charset         =   0
  63.          Weight          =   700
  64.          Underline       =   0   'False
  65.          Italic          =   0   'False
  66.          Strikethrough   =   0   'False
  67.       EndProperty
  68.       BevelOuter      =   1
  69.       Alignment       =   0
  70.       Begin Threed.SSPanel pnlInfo 
  71.          Height          =   255
  72.          Index           =   0
  73.          Left            =   1320
  74.          TabIndex        =   2
  75.          Top             =   300
  76.          Width           =   1455
  77.          _Version        =   65536
  78.          _ExtentX        =   2566
  79.          _ExtentY        =   450
  80.          _StockProps     =   15
  81.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  82.             Name            =   "Arial"
  83.             Size            =   8.25
  84.             Charset         =   0
  85.             Weight          =   400
  86.             Underline       =   0   'False
  87.             Italic          =   0   'False
  88.             Strikethrough   =   0   'False
  89.          EndProperty
  90.          BevelOuter      =   1
  91.          Alignment       =   1
  92.       End
  93.       Begin Threed.SSPanel pnlInfo 
  94.          Height          =   255
  95.          Index           =   1
  96.          Left            =   1320
  97.          TabIndex        =   3
  98.          Top             =   600
  99.          Width           =   1455
  100.          _Version        =   65536
  101.          _ExtentX        =   2566
  102.          _ExtentY        =   450
  103.          _StockProps     =   15
  104.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  105.             Name            =   "Arial"
  106.             Size            =   8.25
  107.             Charset         =   0
  108.             Weight          =   400
  109.             Underline       =   0   'False
  110.             Italic          =   0   'False
  111.             Strikethrough   =   0   'False
  112.          EndProperty
  113.          BevelOuter      =   1
  114.          Alignment       =   1
  115.       End
  116.       Begin Threed.SSPanel pnlInfo 
  117.          Height          =   255
  118.          Index           =   2
  119.          Left            =   1320
  120.          TabIndex        =   4
  121.          Top             =   900
  122.          Width           =   1455
  123.          _Version        =   65536
  124.          _ExtentX        =   2566
  125.          _ExtentY        =   450
  126.          _StockProps     =   15
  127.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  128.             Name            =   "Arial"
  129.             Size            =   8.25
  130.             Charset         =   0
  131.             Weight          =   400
  132.             Underline       =   0   'False
  133.             Italic          =   0   'False
  134.             Strikethrough   =   0   'False
  135.          EndProperty
  136.          BevelOuter      =   1
  137.          Alignment       =   1
  138.       End
  139.       Begin Threed.SSPanel pnlInfo 
  140.          Height          =   255
  141.          Index           =   3
  142.          Left            =   1320
  143.          TabIndex        =   5
  144.          Top             =   1200
  145.          Width           =   1455
  146.          _Version        =   65536
  147.          _ExtentX        =   2566
  148.          _ExtentY        =   450
  149.          _StockProps     =   15
  150.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  151.             Name            =   "Arial"
  152.             Size            =   8.25
  153.             Charset         =   0
  154.             Weight          =   400
  155.             Underline       =   0   'False
  156.             Italic          =   0   'False
  157.             Strikethrough   =   0   'False
  158.          EndProperty
  159.          BevelOuter      =   1
  160.          Alignment       =   1
  161.       End
  162.       Begin Threed.SSPanel pnlInfo 
  163.          Height          =   255
  164.          Index           =   4
  165.          Left            =   1320
  166.          TabIndex        =   7
  167.          Top             =   1500
  168.          Width           =   1455
  169.          _Version        =   65536
  170.          _ExtentX        =   2566
  171.          _ExtentY        =   450
  172.          _StockProps     =   15
  173.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  174.             Name            =   "Arial"
  175.             Size            =   8.25
  176.             Charset         =   0
  177.             Weight          =   400
  178.             Underline       =   0   'False
  179.             Italic          =   0   'False
  180.             Strikethrough   =   0   'False
  181.          EndProperty
  182.          BevelOuter      =   1
  183.          Alignment       =   1
  184.       End
  185.       Begin Threed.SSPanel pnlInfo 
  186.          Height          =   255
  187.          Index           =   5
  188.          Left            =   1320
  189.          TabIndex        =   8
  190.          Top             =   1800
  191.          Width           =   1455
  192.          _Version        =   65536
  193.          _ExtentX        =   2566
  194.          _ExtentY        =   450
  195.          _StockProps     =   15
  196.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  197.             Name            =   "Arial"
  198.             Size            =   8.25
  199.             Charset         =   0
  200.             Weight          =   400
  201.             Underline       =   0   'False
  202.             Italic          =   0   'False
  203.             Strikethrough   =   0   'False
  204.          EndProperty
  205.          BevelOuter      =   1
  206.          Alignment       =   1
  207.       End
  208.       Begin Threed.SSPanel pnlInfo 
  209.          Height          =   255
  210.          Index           =   6
  211.          Left            =   1320
  212.          TabIndex        =   9
  213.          Top             =   2100
  214.          Width           =   1455
  215.          _Version        =   65536
  216.          _ExtentX        =   2566
  217.          _ExtentY        =   450
  218.          _StockProps     =   15
  219.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  220.             Name            =   "Arial"
  221.             Size            =   8.25
  222.             Charset         =   0
  223.             Weight          =   400
  224.             Underline       =   0   'False
  225.             Italic          =   0   'False
  226.             Strikethrough   =   0   'False
  227.          EndProperty
  228.          BevelOuter      =   1
  229.          Alignment       =   1
  230.       End
  231.       Begin Threed.SSPanel pnlInfo 
  232.          Height          =   255
  233.          Index           =   7
  234.          Left            =   1320
  235.          TabIndex        =   10
  236.          Top             =   2400
  237.          Width           =   1455
  238.          _Version        =   65536
  239.          _ExtentX        =   2566
  240.          _ExtentY        =   450
  241.          _StockProps     =   15
  242.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  243.             Name            =   "Arial"
  244.             Size            =   8.25
  245.             Charset         =   0
  246.             Weight          =   400
  247.             Underline       =   0   'False
  248.             Italic          =   0   'False
  249.             Strikethrough   =   0   'False
  250.          EndProperty
  251.          BevelOuter      =   1
  252.          Alignment       =   1
  253.       End
  254.       Begin Threed.SSPanel pnlInfo 
  255.          Height          =   255
  256.          Index           =   8
  257.          Left            =   1320
  258.          TabIndex        =   11
  259.          Top             =   2700
  260.          Width           =   1455
  261.          _Version        =   65536
  262.          _ExtentX        =   2566
  263.          _ExtentY        =   450
  264.          _StockProps     =   15
  265.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  266.             Name            =   "Arial"
  267.             Size            =   8.25
  268.             Charset         =   0
  269.             Weight          =   400
  270.             Underline       =   0   'False
  271.             Italic          =   0   'False
  272.             Strikethrough   =   0   'False
  273.          EndProperty
  274.          BevelOuter      =   1
  275.          Alignment       =   1
  276.       End
  277.       Begin Threed.SSPanel pnlInfo 
  278.          Height          =   255
  279.          Index           =   9
  280.          Left            =   1320
  281.          TabIndex        =   12
  282.          Top             =   3000
  283.          Width           =   1455
  284.          _Version        =   65536
  285.          _ExtentX        =   2566
  286.          _ExtentY        =   450
  287.          _StockProps     =   15
  288.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  289.             Name            =   "Arial"
  290.             Size            =   8.25
  291.             Charset         =   0
  292.             Weight          =   400
  293.             Underline       =   0   'False
  294.             Italic          =   0   'False
  295.             Strikethrough   =   0   'False
  296.          EndProperty
  297.          BevelOuter      =   1
  298.          Alignment       =   1
  299.       End
  300.       Begin Threed.SSPanel pnlInfo 
  301.          Height          =   255
  302.          Index           =   10
  303.          Left            =   1320
  304.          TabIndex        =   13
  305.          Top             =   3300
  306.          Width           =   1455
  307.          _Version        =   65536
  308.          _ExtentX        =   2566
  309.          _ExtentY        =   450
  310.          _StockProps     =   15
  311.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  312.             Name            =   "Arial"
  313.             Size            =   8.25
  314.             Charset         =   0
  315.             Weight          =   400
  316.             Underline       =   0   'False
  317.             Italic          =   0   'False
  318.             Strikethrough   =   0   'False
  319.          EndProperty
  320.          BevelOuter      =   1
  321.          Alignment       =   1
  322.       End
  323.       Begin VB.Label Label2 
  324.          Caption         =   "Contents"
  325.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  326.             Name            =   "Arial"
  327.             Size            =   8.25
  328.             Charset         =   0
  329.             Weight          =   400
  330.             Underline       =   0   'False
  331.             Italic          =   0   'False
  332.             Strikethrough   =   0   'False
  333.          EndProperty
  334.          Height          =   195
  335.          Index           =   12
  336.          Left            =   120
  337.          TabIndex        =   26
  338.          Top             =   2100
  339.          Width           =   675
  340.       End
  341.       Begin VB.Label Label2 
  342.          Caption         =   "Col 5"
  343.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  344.             Name            =   "Arial"
  345.             Size            =   8.25
  346.             Charset         =   0
  347.             Weight          =   400
  348.             Underline       =   0   'False
  349.             Italic          =   0   'False
  350.             Strikethrough   =   0   'False
  351.          EndProperty
  352.          Height          =   195
  353.          Index           =   11
  354.          Left            =   840
  355.          TabIndex        =   25
  356.          Top             =   3300
  357.          Width           =   435
  358.       End
  359.       Begin VB.Label Label2 
  360.          Caption         =   "Col 4"
  361.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  362.             Name            =   "Arial"
  363.             Size            =   8.25
  364.             Charset         =   0
  365.             Weight          =   400
  366.             Underline       =   0   'False
  367.             Italic          =   0   'False
  368.             Strikethrough   =   0   'False
  369.          EndProperty
  370.          Height          =   195
  371.          Index           =   10
  372.          Left            =   840
  373.          TabIndex        =   24
  374.          Top             =   3000
  375.          Width           =   435
  376.       End
  377.       Begin VB.Label Label2 
  378.          Caption         =   "Col 3"
  379.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  380.             Name            =   "Arial"
  381.             Size            =   8.25
  382.             Charset         =   0
  383.             Weight          =   400
  384.             Underline       =   0   'False
  385.             Italic          =   0   'False
  386.             Strikethrough   =   0   'False
  387.          EndProperty
  388.          Height          =   195
  389.          Index           =   9
  390.          Left            =   840
  391.          TabIndex        =   23
  392.          Top             =   2700
  393.          Width           =   435
  394.       End
  395.       Begin VB.Label Label2 
  396.          Caption         =   "Col 2"
  397.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  398.             Name            =   "Arial"
  399.             Size            =   8.25
  400.             Charset         =   0
  401.             Weight          =   400
  402.             Underline       =   0   'False
  403.             Italic          =   0   'False
  404.             Strikethrough   =   0   'False
  405.          EndProperty
  406.          Height          =   195
  407.          Index           =   8
  408.          Left            =   840
  409.          TabIndex        =   22
  410.          Top             =   2400
  411.          Width           =   435
  412.       End
  413.       Begin VB.Label Label2 
  414.          Caption         =   "Col 1"
  415.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  416.             Name            =   "Arial"
  417.             Size            =   8.25
  418.             Charset         =   0
  419.             Weight          =   400
  420.             Underline       =   0   'False
  421.             Italic          =   0   'False
  422.             Strikethrough   =   0   'False
  423.          EndProperty
  424.          Height          =   195
  425.          Index           =   7
  426.          Left            =   840
  427.          TabIndex        =   21
  428.          Top             =   2100
  429.          Width           =   435
  430.       End
  431.       Begin VB.Label Label2 
  432.          Caption         =   "Cols per Series"
  433.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  434.             Name            =   "Arial"
  435.             Size            =   8.25
  436.             Charset         =   0
  437.             Weight          =   400
  438.             Underline       =   0   'False
  439.             Italic          =   0   'False
  440.             Strikethrough   =   0   'False
  441.          EndProperty
  442.          Height          =   195
  443.          Index           =   6
  444.          Left            =   120
  445.          TabIndex        =   20
  446.          Top             =   1800
  447.          Width           =   1155
  448.       End
  449.       Begin VB.Label Label2 
  450.          Caption         =   "Z"
  451.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  452.             Name            =   "Arial"
  453.             Size            =   8.25
  454.             Charset         =   0
  455.             Weight          =   400
  456.             Underline       =   0   'False
  457.             Italic          =   0   'False
  458.             Strikethrough   =   0   'False
  459.          EndProperty
  460.          Height          =   195
  461.          Index           =   5
  462.          Left            =   1080
  463.          TabIndex        =   19
  464.          Top             =   1500
  465.          Width           =   195
  466.       End
  467.       Begin VB.Label Label2 
  468.          Caption         =   "Y2"
  469.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  470.             Name            =   "Arial"
  471.             Size            =   8.25
  472.             Charset         =   0
  473.             Weight          =   400
  474.             Underline       =   0   'False
  475.             Italic          =   0   'False
  476.             Strikethrough   =   0   'False
  477.          EndProperty
  478.          Height          =   195
  479.          Index           =   4
  480.          Left            =   1080
  481.          TabIndex        =   18
  482.          Top             =   1200
  483.          Width           =   195
  484.       End
  485.       Begin VB.Label Label2 
  486.          Caption         =   "Y"
  487.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  488.             Name            =   "Arial"
  489.             Size            =   8.25
  490.             Charset         =   0
  491.             Weight          =   400
  492.             Underline       =   0   'False
  493.             Italic          =   0   'False
  494.             Strikethrough   =   0   'False
  495.          EndProperty
  496.          Height          =   195
  497.          Index           =   3
  498.          Left            =   1080
  499.          TabIndex        =   17
  500.          Top             =   900
  501.          Width           =   195
  502.       End
  503.       Begin VB.Label Label2 
  504.          Caption         =   "X"
  505.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  506.             Name            =   "Arial"
  507.             Size            =   8.25
  508.             Charset         =   0
  509.             Weight          =   400
  510.             Underline       =   0   'False
  511.             Italic          =   0   'False
  512.             Strikethrough   =   0   'False
  513.          EndProperty
  514.          Height          =   195
  515.          Index           =   2
  516.          Left            =   1080
  517.          TabIndex        =   16
  518.          Top             =   600
  519.          Width           =   195
  520.       End
  521.       Begin VB.Label Label2 
  522.          Caption         =   "Axis Type"
  523.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  524.             Name            =   "Arial"
  525.             Size            =   8.25
  526.             Charset         =   0
  527.             Weight          =   400
  528.             Underline       =   0   'False
  529.             Italic          =   0   'False
  530.             Strikethrough   =   0   'False
  531.          EndProperty
  532.          Height          =   195
  533.          Index           =   1
  534.          Left            =   120
  535.          TabIndex        =   15
  536.          Top             =   600
  537.          Width           =   795
  538.       End
  539.       Begin VB.Label Label2 
  540.          Caption         =   "VtChChartType"
  541.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  542.             Name            =   "Arial"
  543.             Size            =   8.25
  544.             Charset         =   0
  545.             Weight          =   400
  546.             Underline       =   0   'False
  547.             Italic          =   0   'False
  548.             Strikethrough   =   0   'False
  549.          EndProperty
  550.          Height          =   195
  551.          Index           =   0
  552.          Left            =   120
  553.          TabIndex        =   14
  554.          Top             =   300
  555.          Width           =   1155
  556.       End
  557.    End
  558.    Begin VtChartLib.VtChart VtChart1 
  559.       Height          =   5175
  560.       Left            =   120
  561.       TabIndex        =   27
  562.       Top             =   120
  563.       Width           =   6135
  564.       _ExtentX        =   10821
  565.       _ExtentY        =   9128
  566.       _0              =   $"GRIDINFO.frx":030A
  567.       _1              =   $"GRIDINFO.frx":070F
  568.       _2              =   $"GRIDINFO.frx":0B14
  569.       _3              =   $"GRIDINFO.frx":0F19
  570.       _4              =   $"GRIDINFO.frx":131E
  571.       _5              =   $"GRIDINFO.frx":1723
  572.       _6              =   $"GRIDINFO.frx":1B28
  573.       _7              =   $"GRIDINFO.frx":1F2D
  574.       _8              =   $"GRIDINFO.frx":2332
  575.       _9              =   $"GRIDINFO.frx":2737
  576.       _10             =   $"GRIDINFO.frx":2B3C
  577.       _11             =   $"GRIDINFO.frx":2F41
  578.       _12             =   $"GRIDINFO.frx":3346
  579.       _13             =   $"GRIDINFO.frx":374B
  580.       _count          =   14
  581.       _ver            =   1
  582.    End
  583.    Begin MSGrid.Grid Grid1 
  584.       Height          =   1755
  585.       Left            =   60
  586.       TabIndex        =   6
  587.       Top             =   5460
  588.       Width           =   6315
  589.       _Version        =   65536
  590.       _ExtentX        =   11139
  591.       _ExtentY        =   3096
  592.       _StockProps     =   77
  593.       BackColor       =   13827580
  594.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  595.          Name            =   "MS Sans Serif"
  596.          Size            =   8.25
  597.          Charset         =   0
  598.          Weight          =   700
  599.          Underline       =   0   'False
  600.          Italic          =   0   'False
  601.          Strikethrough   =   0   'False
  602.       EndProperty
  603.       Rows            =   7
  604.       Cols            =   3
  605.    End
  606. Attribute VB_Name = "Form1"
  607. Attribute VB_Creatable = False
  608. Attribute VB_Exposed = False
  609. Option Explicit
  610. Sub ShowInfo(cType$, xType$, yType$, y2Type$, zType$, cps$, c1$, c2$, c3$, c4$, c5$)
  611.    pnlInfo(0).Caption = cType
  612.    pnlInfo(1).Caption = xType
  613.    pnlInfo(2).Caption = yType
  614.    pnlInfo(3).Caption = y2Type
  615.    pnlInfo(4).Caption = zType
  616.    pnlInfo(5).Caption = cps
  617.    pnlInfo(6).Caption = c1
  618.    pnlInfo(7).Caption = c2
  619.    pnlInfo(8).Caption = c3
  620.    pnlInfo(9).Caption = c4
  621.    pnlInfo(10).Caption = c5
  622. End Sub
  623. Private Sub Form_Load()
  624.    With lstChartType
  625.       .AddItem "2D Bar"
  626.       .AddItem "2D Line"
  627.       .AddItem "2D Area"
  628.       .AddItem "2D Step"
  629.       .AddItem "2D Combination"
  630.       .AddItem "2D Horizontal Bar"
  631.       .AddItem "2D Gantt"
  632.       .AddItem "2D Pie"
  633.       .AddItem "2D XY (Scatter)"
  634.       .AddItem "2D Radar - Line"
  635.       .AddItem "2D Radar - Area"
  636.       .AddItem "2D Polar"
  637.       .AddItem "2D Bubble"
  638.       .AddItem "2D HiLo"
  639.       .AddItem "2D HiLoClose (Across)"
  640.       .AddItem "2D HiLoClose (Right)"
  641.       .AddItem "2D OpenHiLoClose "
  642.       .AddItem "2D OpenHiLoClose Bar-Date"
  643.       .AddItem "2D OpenHiLoClose Bar-Category"
  644.       .AddItem "2D Contour"
  645.       .AddItem "3D Bar"
  646.       .AddItem "3D Line"
  647.       .AddItem "3D Area"
  648.       .AddItem "3D Step"
  649.       .AddItem "3D Combination"
  650.       .AddItem "3D Clustered Bar"
  651.       .AddItem "3D Horizontal Bar"
  652.       .AddItem "3D Gantt"
  653.       .AddItem "3D Pie"
  654.       .AddItem "3D Doughnut"
  655.       .AddItem "3D Surface"
  656.       .AddItem "3D XYZ"
  657.       .AddItem "3D Scatter"
  658.    End With
  659.    vtchart1.Legend.Location.Visible = True
  660.    vtchart1.Legend.Location.LocationType = VtChLocationTypeBottom
  661.    'set first chart type - 2D bar
  662.    lstChartType.ListIndex = 0
  663. End Sub
  664. Private Sub lstChartType_Click()
  665.    Dim ind%, colCount%, i%
  666.    vtchart1.Plot.Axis(VtChAxisIdZ).AxisScale.Hide = False
  667.    vtchart1.Plot.SeriesCollection.Item(1).SeriesMarker.Show = False
  668.    Select Case lstChartType.ListIndex
  669.       Case 0
  670.          vtchart1.ColumnCount = 1
  671.          vtchart1.ChartType = VtChChartType2dBar
  672.          ShowInfo "2dBar", "Category", "Value", "Value", "", 1, "", "", "", "", ""
  673.          
  674.       Case 1
  675.          vtchart1.ColumnCount = 1
  676.          vtchart1.ChartType = VtChChartType2dLine
  677.          ShowInfo "2dLine", "Category", "Value", "Value", "", 1, "", "", "", "", ""
  678.          
  679.       Case 2
  680.          vtchart1.ColumnCount = 1
  681.          vtchart1.ChartType = VtChChartType2dArea
  682.          ShowInfo "2dArea", "Category", "Value", "Value", "", 1, "", "", "", "", ""
  683.          
  684.       Case 3
  685.          vtchart1.ColumnCount = 1
  686.          vtchart1.ChartType = VtChChartType2dStep
  687.          ShowInfo "2dStep", "Category", "Value", "Value", "", 1, "", "", "", "", ""
  688.          
  689.       Case 4
  690.          vtchart1.ColumnCount = 4
  691.          vtchart1.ChartType = VtChChartType2dCombination
  692.          With vtchart1.Plot.SeriesCollection
  693.             .Item(1).SeriesType = VtChSeriesType2dLine
  694.             .Item(2).SeriesType = VtChSeriesType2dBar
  695.             .Item(3).SeriesType = VtChSeriesType2dArea
  696.             .Item(4).SeriesType = VtChSeriesType2dStep
  697.          End With
  698.          ShowInfo "2dCombination", "Category", "Value", "Value", "", 1, "", "", "", "", ""
  699.          
  700.       Case 5
  701.          vtchart1.ColumnCount = 1
  702.          vtchart1.ChartType = VtChChartType2dHorizontalBar
  703.          ShowInfo "2dHorizontalBar", "Category", "Value", "", "", 1, "", "", "", "", ""
  704.          
  705.       Case 6
  706.          vtchart1.ColumnCount = 2
  707.          vtchart1.ChartType = VtChChartType2dGantt
  708.          ShowInfo "2dGantt", "Category", "Date", "", "", 2, "Start Date", "Duration", "", "", ""
  709.          
  710.       Case 7
  711.          vtchart1.ColumnCount = 1
  712.          vtchart1.ChartType = VtChChartType2dPie
  713.          ShowInfo "2dPie", "Pie Labels", "", "", "", 1, "", "", "", "", ""
  714.          
  715.       Case 8
  716.          vtchart1.ColumnCount = 2
  717.          vtchart1.ChartType = VtChChartType2dXY
  718.          ShowInfo "2dXY", "Value", "Value", "", "", 2, "X Value", "Y Value", "", "", ""
  719.          
  720.       Case 9
  721.          vtchart1.ColumnCount = 1
  722.          vtchart1.ChartType = VtChChartType2dRadar
  723.          For i = 1 To vtchart1.ColumnCount
  724.             vtchart1.Column = i
  725.             vtchart1.SeriesType = VtChSeriesType2dRadarLine
  726.          Next i
  727.          ShowInfo "2dRadar", "Radar", "Value", "", "", 1, "", "", "", "", ""
  728.          
  729.       Case 10
  730.          vtchart1.ColumnCount = 1
  731.          vtchart1.ChartType = VtChChartType2dRadar
  732.          For i = 1 To vtchart1.ColumnCount
  733.             vtchart1.Column = i
  734.             vtchart1.SeriesType = VtChSeriesType2dRadarArea
  735.          Next i
  736.          ShowInfo "2dRadar", "Radar", "Value", "", "", 1, "", "", "", "", ""
  737.          
  738.       Case 11
  739.          vtchart1.ColumnCount = 2
  740.          vtchart1.ChartType = VtChChartType2dPolar
  741.          ShowInfo "2dPolar", "Angle", "Value", "", "", 2, "Angle", "Radius", "", "", ""
  742.          
  743.       Case 12
  744.          vtchart1.ColumnCount = 3
  745.          vtchart1.ChartType = VtChChartType2dBubble
  746.          ShowInfo "2dBubble", "Value", "Value", "", "", 3, "X value", "Y Value", "Bubble Size", "", ""
  747.          
  748.       Case 13 'High - Low chart
  749.          vtchart1.ColumnCount = 3
  750.          vtchart1.ChartType = VtChChartType2dHiLo
  751.          'set column 1 series type to dates, rest of the columns to HiLo
  752.          vtchart1.Column = 1
  753.          vtchart1.SeriesType = VtChSeriesType2dDates
  754.          For i = 2 To vtchart1.ColumnCount
  755.             vtchart1.Column = i
  756.             vtchart1.SeriesType = VtChSeriesType2dHiLo
  757.          Next i
  758.          ShowInfo "2dHiLo", "Category or Date", "Value", "Value", "", "2", "Dates", "High", "Low", "", ""
  759.          
  760.       Case 14 'hiloclose across
  761.          vtchart1.ColumnCount = 4
  762.          vtchart1.ChartType = VtChChartType2dHiLo
  763.          'set column 1 series type to dates, rest of the columns to HiLo
  764.          vtchart1.Column = 1
  765.          vtchart1.SeriesType = VtChSeriesType2dDates
  766.          For i = 2 To vtchart1.ColumnCount
  767.             vtchart1.Column = i
  768.             vtchart1.SeriesType = VtChSeriesType2dHLC
  769.          Next i
  770.          ShowInfo "2dHiLo", "Category or Date", "Value", "Value", "", "3", "Dates", "High", "Low", "Close", ""
  771.          
  772.       Case 15 'hiloclose right
  773.          vtchart1.ColumnCount = 4
  774.          vtchart1.ChartType = VtChChartType2dHiLo
  775.          'set column 1 series type to dates, rest of the columns to HiLo
  776.          vtchart1.Column = 1
  777.          vtchart1.SeriesType = VtChSeriesType2dDates
  778.          For i = 2 To vtchart1.ColumnCount
  779.             vtchart1.Column = i
  780.             vtchart1.SeriesType = VtChSeriesType2dHLCRight
  781.          Next i
  782.          ShowInfo "2dHiLo", "Category or Date", "Value", "Value", "", "3", "Dates", "High", "Low", "Close", ""
  783.          
  784.       Case 16 'openhiloclose
  785.          vtchart1.ColumnCount = 5
  786.          vtchart1.ChartType = VtChChartType2dHiLo
  787.          'set column 1 series type to dates, rest of the columns to HiLo
  788.          vtchart1.Column = 1
  789.          vtchart1.SeriesType = VtChSeriesType2dDates
  790.          For i = 2 To vtchart1.ColumnCount
  791.             vtchart1.Column = i
  792.             vtchart1.SeriesType = VtChSeriesType2dOHLC
  793.          Next i
  794.          ShowInfo "2dHiLo", "Category or Date", "Value", "Value", "", "4", "Dates", "Open", "High", "Low", "Close"
  795.          
  796.       Case 17 'open hiloclose bar-date
  797.          vtchart1.ColumnCount = 5
  798.          vtchart1.ChartType = VtChChartType2dHiLo
  799.          'set column 1 series type to dates, rest of the columns to HiLo
  800.          vtchart1.Column = 1
  801.          vtchart1.SeriesType = VtChSeriesType2dDates
  802.          For i = 2 To vtchart1.ColumnCount
  803.             vtchart1.Column = i
  804.             vtchart1.SeriesType = VtChSeriesType2dOHLCBar
  805.          Next i
  806.          ShowInfo "2dHiLo", "Category or Date", "Value", "Value", "", "4", "Dates", "Open", "High", "Low", "Close"
  807.          
  808.       Case 18 'open hiloclose bar-category
  809.          vtchart1.ColumnCount = 4
  810.          vtchart1.ChartType = VtChChartType2dHiLo
  811.          For i = 1 To vtchart1.ColumnCount
  812.             vtchart1.Column = i
  813.             vtchart1.SeriesType = VtChSeriesType2dOHLCBar
  814.          Next i
  815.          ShowInfo "2dHiLo", "Category or Date", "Value", "Value", "", "4", "Open", "High", "Low", "Close", ""
  816.          
  817.       Case 19
  818.          vtchart1.ColumnCount = 4
  819.          vtchart1.ChartType = VtChChartType2dContour
  820.          ShowInfo "2dContour", "Category", "", "", "Category", "1", "", "", "", "", ""
  821.          
  822.       Case 20
  823.          vtchart1.ColumnCount = 1
  824.          vtchart1.ChartType = VtChChartType3dBar
  825.          ShowInfo "3dBar", "Category", "Value", "Value", "Category", "1", "", "", "", "", ""
  826.          
  827.       Case 21
  828.          vtchart1.ColumnCount = 1
  829.          vtchart1.ChartType = VtChChartType3dLine
  830.          ShowInfo "3dLine", "Category", "Value", "Value", "Category", "1", "", "", "", "", ""
  831.          
  832.       Case 22
  833.          vtchart1.ColumnCount = 1
  834.          vtchart1.ChartType = VtChChartType3dArea
  835.          ShowInfo "3dArea", "Category", "Value", "Value", "Category", "1", "", "", "", "", ""
  836.          
  837.       Case 23
  838.          vtchart1.ColumnCount = 1
  839.          vtchart1.ChartType = VtChChartType3dStep
  840.          ShowInfo "3dStep", "Category", "Value", "Value", "Category", "1", "", "", "", "", ""
  841.          
  842.       Case 24
  843.          vtchart1.ColumnCount = 4
  844.          vtchart1.ChartType = VtChChartType3dCombination
  845.          With vtchart1.Plot.SeriesCollection
  846.             .Item(1).SeriesType = VtChSeriesType3dLine
  847.             .Item(2).SeriesType = VtChSeriesType3dBar
  848.             .Item(3).SeriesType = VtChSeriesType3dStep
  849.             .Item(4).SeriesType = VtChSeriesType3dArea
  850.          End With
  851.          ShowInfo "3dCombination", "Category", "Value", "Value", "Category", "1", "", "", "", "", ""
  852.          
  853.       Case 25
  854.          vtchart1.ColumnCount = 2
  855.          vtchart1.ChartType = VtChChartType3dClusteredBar
  856.          ShowInfo "3dClusteredBar", "Category", "Value", "Value", "", "1", "", "", "", "", ""
  857.          
  858.       Case 26
  859.          vtchart1.ColumnCount = 1
  860.          vtchart1.ChartType = VtChChartType3dHorizontalBar
  861.          vtchart1.Plot.Axis(VtChAxisIdZ).AxisScale.Hide = True
  862.          ShowInfo "3dHorizontalBar", "Category", "Value", "", "", "1", "", "", "", "", ""
  863.          
  864.       Case 27
  865.          vtchart1.ColumnCount = 2
  866.          vtchart1.ChartType = VtChChartType3dGantt
  867.          ShowInfo "3dGantt", "Category", "Date", "", "Category", "2", "Start Date", "Duration", "", "", ""
  868.          
  869.       Case 28
  870.          vtchart1.ColumnCount = 1
  871.          vtchart1.ChartType = VtChChartType3dPie
  872.          ShowInfo "3dPie", "Pie Labels", "", "", "", "1", "", "", "", "", ""
  873.          
  874.       Case 29
  875.          vtchart1.ColumnCount = 1
  876.          vtchart1.ChartType = VtChChartType3dDoughnut
  877.          ShowInfo "3dDoughnut", "Doughnut Labels", "", "", "", "1", "", "", "", "", ""
  878.          
  879.       Case 30
  880.          vtchart1.ColumnCount = 4
  881.          vtchart1.ChartType = VtChChartType3dSurface
  882.          ShowInfo "3dSurface", "Category", "Value", "Value", "Category", "1", "", "", "", "", ""
  883.          
  884.       Case 31
  885.          vtchart1.ColumnCount = 3
  886.          vtchart1.Plot.SeriesCollection.Item(1).SeriesMarker.Show = True
  887.          vtchart1.ChartType = VtChChartType3dXYZ
  888.          ShowInfo "3dXYZ", "Value", "Value", "Value", "Value", "3", "X Value", "Y Value", "Z Value", "", ""
  889.       
  890.       Case 32
  891.          vtchart1.ColumnCount = 3
  892.          vtchart1.Plot.SeriesCollection.Item(1).SeriesMarker.Show = True
  893.          vtchart1.ChartType = VtChChartType3dScatter
  894.          ShowInfo "3dScatter", "Value", "Value", "Value", "Value", "3", "X Value", "Y Value", "Z Value", "", ""
  895.          
  896.    End Select
  897.    SetGridData
  898. End Sub
  899. Private Sub SetGridData()
  900.    Dim i%, j%
  901.    '' Clear the grid and set new size
  902.    Grid1.Rows = 2
  903.    Grid1.Cols = 2
  904.    Grid1.Rows = vtchart1.RowCount + 2
  905.    Grid1.Cols = vtchart1.ColumnCount + 2
  906.    '' Make the Grid Columns wider
  907.    For i = 1 To Grid1.Cols - 1
  908.       Grid1.ColWidth(i) = 800
  909.    Next i
  910.    '' Set row labels in first column of grid
  911.    Grid1.Col = 1
  912.    For i = 2 To vtchart1.RowCount + 1
  913.       Grid1.Row = i
  914.       Grid1.Text = "Row " & (i - 1)
  915.    Next i
  916.    '' Set column labels - All charts contain one series except
  917.    '' for combo and clustered bar
  918.    Grid1.Row = 1
  919.    Grid1.Col = 2
  920.    Grid1.Text = "Series " & 1
  921.    If (vtchart1.ChartType = VtChChartType2dCombination) Or _
  922.       (vtchart1.ChartType = VtChChartType3dCombination) Or _
  923.       (vtchart1.ChartType = VtChChartType3dClusteredBar) Or _
  924.       (vtchart1.ChartType = VtChChartType3dSurface) Or _
  925.       (vtchart1.ChartType = VtChChartType2dContour) Then
  926.       For i = 2 To vtchart1.ColumnCount
  927.          Grid1.Col = i + 1
  928.          Grid1.Text = "Series " & i
  929.       Next
  930.    End If
  931.    '' Set data in grid
  932.    For i = vtchart1.RowCount + 1 To 2 Step -1
  933.       Grid1.Row = i
  934.       For j = vtchart1.ColumnCount + 1 To 2 Step -1
  935.          Grid1.Col = j
  936.          Grid1.Text = Str(i * j * 10)
  937.       Next j
  938.    Next i
  939.    '' Set date data for HiLo chart in first column
  940.    If (vtchart1.ChartType = VtChChartType2dHiLo) Then
  941.       'set date data for column 2 if column 2 is dates series
  942.       Grid1.Col = 2
  943.       'set series name to dates if column 1 series type is dates, otherwise column 1 name is series1
  944.       vtchart1.Column = 1
  945.       If vtchart1.SeriesType = VtChSeriesType2dDates Then
  946.          'when HiLo chart type uses date X axis
  947.          For i = 2 To vtchart1.RowCount + 1
  948.             Grid1.Row = i
  949.             Grid1.Text = Str(34988 + i * 4)
  950.          Next i
  951.          'set label = dates for col2, series1 for col3, blank for rest of the columns
  952.          Grid1.Row = 1
  953.          Grid1.Col = 2
  954.          Grid1.Text = "Dates"
  955.          Grid1.Col = 3
  956.          Grid1.Text = "Series 1"
  957.       Else
  958.          'when HiLo chart type uses category X axis
  959.          Grid1.Row = 1
  960.          Grid1.Col = 2
  961.          Grid1.Text = "Series 1"
  962.       End If
  963.    End If
  964.    GridToDataGrid
  965. End Sub
  966. Private Sub GridToDataGrid()
  967.    Dim i%, j%
  968.    '' Set column labels
  969.    Grid1.Row = 1
  970.    For i = 1 To vtchart1.ColumnCount
  971.       Grid1.Col = i + 1
  972.       vtchart1.Column = i
  973.       vtchart1.ColumnLabel = Grid1.Text
  974.    Next i
  975.    '' Set row labels
  976.    Grid1.Col = 1
  977.    For i = 1 To vtchart1.RowCount
  978.       Grid1.Row = i + 1
  979.       vtchart1.Row = i
  980.       vtchart1.RowLabel = Grid1.Text
  981.    Next i
  982.    '' For these simple charts their is always one
  983.    '' level of row and col labels
  984.    For i = 1 To vtchart1.RowCount
  985.       For j = 1 To vtchart1.ColumnCount
  986.          Grid1.Row = i + 1
  987.          Grid1.Col = j + 1
  988.          vtchart1.DataGrid.SetData i, j, Val(Grid1.Text), False
  989.       Next j
  990.    Next i
  991. End Sub
  992.